import {BasicColumn} from '/@//components/Table';
import {FormSchema} from '/@//components/Table';
import { rules} from '/@//utils/helper/validator';
import { render } from '/@//utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@//utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '家族名称',
    align:"center",
    dataIndex: 'familyName'
   },
   {
    title: '客户名称',
    align:"center",
    dataIndex: 'customerName'
   },
   {
    title: '业务线',
    align:"center",
    dataIndex: 'businessLine'
   },
   {
    title: '区域',
    align:"center",
    dataIndex: 'regionArea'
   },
   {
    title: '服务说明',
    align:"center",
    dataIndex: 'serviceDescription'
   },
   {
    title: '注意事项',
    align:"center",
    dataIndex: 'cautionsNote'
   },
   {
    title: '是否付款',
    align:"center",
    dataIndex: 'isPayment'
   },
   {
    title: '流程实例id',
    align:"center",
    dataIndex: 'processInstanceId'
   },
   {
    title: '流程状态',
    align:"center",
    dataIndex: 'processStatus'
   },
   {
    title: '流程定义key',
    align:"center",
    dataIndex: 'processKey'
   },
   {
    title: '流程当前节点',
    align:"center",
    dataIndex: 'processLocation'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '家族名称',
    field: 'familyName',
    component: 'Input',
  },
  {
    label: '客户名称',
    field: 'customerName',
    component: 'Input',
  },
  {
    label: '业务线',
    field: 'businessLine',
    component: 'Input',
  },
  {
    label: '区域',
    field: 'regionArea',
    component: 'Input',
  },
  {
    label: '服务说明',
    field: 'serviceDescription',
    component: 'Input',
  },
  {
    label: '注意事项',
    field: 'cautionsNote',
    component: 'Input',
  },
  {
    label: '是否付款',
    field: 'isPayment',
    component: 'Input',
  },
  {
    label: '流程实例id',
    field: 'processInstanceId',
    component: 'Input',
  },
  {
    label: '流程状态',
    field: 'processStatus',
    component: 'Input',
  },
  {
    label: '流程定义key',
    field: 'processKey',
    component: 'Input',
  },
  {
    label: '流程当前节点',
    field: 'processLocation',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  familyName: {title: '家族名称',order: 0,view: 'text', type: 'string',},
  customerName: {title: '客户名称',order: 1,view: 'text', type: 'string',},
  businessLine: {title: '业务线',order: 2,view: 'text', type: 'string',},
  regionArea: {title: '区域',order: 3,view: 'text', type: 'string',},
  serviceDescription: {title: '服务说明',order: 4,view: 'text', type: 'string',},
  cautionsNote: {title: '注意事项',order: 5,view: 'text', type: 'string',},
  isPayment: {title: '是否付款',order: 6,view: 'text', type: 'string',},
  processInstanceId: {title: '流程实例id',order: 7,view: 'text', type: 'string',},
  processStatus: {title: '流程状态',order: 8,view: 'text', type: 'string',},
  processKey: {title: '流程定义key',order: 9,view: 'text', type: 'string',},
  processLocation: {title: '流程当前节点',order: 10,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
